package com.lawrence.common.bean.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @author wanglanglang
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@ApiModel(value = "用户")
@TableName(value = "user")
public class User {

    @ApiModelProperty(value = "用户 ID")
    @NotNull(message = "id is null")
    @TableId
    private int id;

    @ApiModelProperty(value = "用户名")
    @NotNull(message = "name is null")
    @TableField
    private String name;

    @ApiModelProperty(value = "用户密码")
    @NotNull(message = "password is null")
    @TableField
    private String password;
}
